package com.panda.web.mapper.commons;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panda.web.entity.commons.Conversation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface ConversationMapper extends BaseMapper<Conversation> {
    @Select("SELECT * FROM conversation WHERE openid = #{openid} ORDER BY created_at ASC")
    List<Conversation> findByUserIdOrderByCreatedAtAsc(@Param("openid") String openid);
}